/**
 * @Author: Your name
 * @Date:   2024-03-18 11:12:10
 * @Last Modified by:   Your name
 * @Last Modified time: 2024-03-19 15:06:42
 */
import 'package:flutter/material.dart';
class Tab1Content extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ListView.builder(
      itemCount: 20, // 假设有 20 条数据
      itemBuilder: (context, index) {    
        return ListTile(
          leading: CircleAvatar(
            child: Text('${index + 1}'), // 显示序号
          ),
          title: Text('消息标题 $index'), // 替换成实际的消息标题
          subtitle: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Text('消息内容 $index'), // 替换成实际的消息内容
              Text('10:30', style: TextStyle(color: Colors.grey)), // 聊天时间
            ],
          ),
          onTap: () {
            // 处理点击事件
            print('点击了第 $index 条消息');
          },
        );
      },
    );
  }
}
